com.justhis.xml
Class XMLHelper

java.lang.Object
  extended bycom.justhis.xml.XMLHelper

public class XMLHelper
extends java.lang.Object

TODO DOCUMENT ME!

Version:
$Revision: 1.1 $
Author:
acai

Constructor Summary
XMLHelper()
           
 
Method Summary
static java.lang.String convertXMLToString(org.w3c.dom.Document doc)
          TODO DOCUMENT ME!
static org.w3c.dom.Document createXml()
          TODO DOCUMENT ME!
static org.w3c.dom.Document createXml(java.lang.String root)
          TODO DOCUMENT ME!
static void main(java.lang.String[] args)
           
static void mergeXML(org.w3c.dom.Element mergeToXML, org.w3c.dom.Element mergeFromXML, boolean childrenOnly)
          Copies the children of the mergeFromXML element and places them as children in the mergeToXML.
static void outputTextToFile(java.lang.String text, java.lang.String fileName)
          TODO DOCUMENT ME!
static void outputXML(org.w3c.dom.Document doc, java.io.PrintStream stream)
          TODO DOCUMENT ME!
static void outputXMLToFile(org.w3c.dom.Document doc, java.lang.String fileName)
          TODO DOCUMENT ME!
static org.w3c.dom.Document parseXMLFromFile(java.io.File f)
          TODO DOCUMENT ME!
static org.w3c.dom.Document parseXMLFromString(java.lang.String source)
          TODO DOCUMENT ME!
static org.w3c.dom.Document parseXMLFromURL(java.net.URL url)
          TODO DOCUMENT ME!
static org.w3c.dom.Document parseXMLFromURLString(java.lang.String url)
          TODO DOCUMENT ME!
static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc, org.w3c.dom.Document xslDoc)
          TODO DOCUMENT ME!
static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc, org.w3c.dom.Document xslDoc, XParameters params)
          TODO DOCUMENT ME!
static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc, java.io.File xslFile)
          TODO DOCUMENT ME!
static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc, java.io.File xslFile, XParameters params)
          TODO DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHelper

public XMLHelper()
Method Detail

convertXMLToString

public static java.lang.String convertXMLToString(org.w3c.dom.Document doc)
                                           throws XMLException
TODO DOCUMENT ME!

Parameters:
doc - TODO
Returns:
TODO
Throws:
XMLException - TODO

createXml

public static org.w3c.dom.Document createXml()
TODO DOCUMENT ME!

Returns:
TODO

createXml

public static org.w3c.dom.Document createXml(java.lang.String root)
TODO DOCUMENT ME!

Parameters:
root - TODO
Returns:
TODO

main

public static void main(java.lang.String[] args)

mergeXML

public static void mergeXML(org.w3c.dom.Element mergeToXML,
                            org.w3c.dom.Element mergeFromXML,
                            boolean childrenOnly)
Copies the children of the mergeFromXML element and places them as children in the mergeToXML. Of course it recursively gets the children as well. If childrenOnly is set to false, just insert the mergeFromXML under the mergeToXML.

Parameters:
mergeToXML - TODO
mergeFromXML - TODO
childrenOnly - TODO

outputTextToFile

public static void outputTextToFile(java.lang.String text,
                                    java.lang.String fileName)
                             throws XMLException
TODO DOCUMENT ME!

Parameters:
text - TODO
fileName - TODO
Throws:
XMLException - TODO

outputXML

public static void outputXML(org.w3c.dom.Document doc,
                             java.io.PrintStream stream)
                      throws XMLException
TODO DOCUMENT ME!

Parameters:
doc - TODO
stream - TODO
Throws:
XMLException - TODO

outputXMLToFile

public static void outputXMLToFile(org.w3c.dom.Document doc,
                                   java.lang.String fileName)
                            throws XMLException
TODO DOCUMENT ME!

Parameters:
doc - TODO
fileName - TODO
Throws:
XMLException - TODO

parseXMLFromFile

public static org.w3c.dom.Document parseXMLFromFile(java.io.File f)
                                             throws XMLException
TODO DOCUMENT ME!

Parameters:
f - TODO
Returns:
TODO
Throws:
XMLException - TODO

parseXMLFromString

public static org.w3c.dom.Document parseXMLFromString(java.lang.String source)
                                               throws XMLException
TODO DOCUMENT ME!

Parameters:
source - TODO
Returns:
TODO
Throws:
XMLException - TODO

parseXMLFromURL

public static org.w3c.dom.Document parseXMLFromURL(java.net.URL url)
                                            throws XMLException
TODO DOCUMENT ME!

Parameters:
url - TODO
Returns:
TODO
Throws:
XMLException - TODO

parseXMLFromURLString

public static org.w3c.dom.Document parseXMLFromURLString(java.lang.String url)
                                                  throws XMLException
TODO DOCUMENT ME!

Parameters:
url - TODO
Returns:
TODO
Throws:
XMLException - TODO

transformXML

public static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc,
                                                org.w3c.dom.Document xslDoc)
                                         throws XMLException
TODO DOCUMENT ME!

Parameters:
xmlDoc - TODO
xslDoc - TODO
Returns:
TODO
Throws:
XMLException - TODO

transformXML

public static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc,
                                                org.w3c.dom.Document xslDoc,
                                                XParameters params)
                                         throws XMLException
TODO DOCUMENT ME!

Parameters:
xmlDoc - TODO
xslDoc - TODO
params - TODO
Returns:
TODO
Throws:
XMLException - TODO

transformXML

public static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc,
                                                java.io.File xslFile)
                                         throws XMLException
TODO DOCUMENT ME!

Parameters:
xmlDoc - TODO
xslFile - TODO
Returns:
TODO
Throws:
XMLException - TODO

transformXML

public static org.w3c.dom.Document transformXML(org.w3c.dom.Document xmlDoc,
                                                java.io.File xslFile,
                                                XParameters params)
                                         throws XMLException
TODO DOCUMENT ME!

Parameters:
xmlDoc - TODO
xslFile - TODO
params - TODO
Returns:
TODO
Throws:
XMLException - TODO


Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.